﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FormView.aspx.cs" Inherits="EditTable.FromView" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body>
    <form id="formView" runat="server">
        <asp:Repeater runat="server" ID="repeater">
            <ItemTemplate>
                Category name: <b><%# Server.HtmlEncode((string)Eval("CategoryName")) %> </b> <br />
                Description:   <b><%# Eval("Description") %>  </b> <br />
                <asp:HyperLink runat="server" ID="edit" Target="_parent" 
                    NavigateUrl='<%# Eval("CategoryID", "~/FormEdit.aspx?ID={0}") %>' Text="Edit">
                </asp:HyperLink> 
                <asp:Button runat="server" ID="buttonDelete" Text="Delete" PostBackUrl='<%# Eval("CategoryID", "~/FormDelete.aspx?ID={0}") %>' />
                <hr />
            </ItemTemplate>
        </asp:Repeater>
        <asp:HyperLink runat="server" ID="add" Target="_parent"
            NavigateUrl="~/FormAddNew.aspx" Text="Add new">
        </asp:HyperLink>
    </form>
</body>
</html>
